package com.lkd.mapper;

import com.github.pagehelper.Page;
import com.lkd.dto.SkuClassDto;
import com.lkd.entity.SkuClass;
import com.lkd.vo.SkuClassVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface SkuClassMapper {

    @Insert("insert into tb_sku_class (class_name) values (#{className})")
    void insert(SkuClassDto skuClassDto);

    Page<SkuClassVo> selectBycondition(String className);

    @Select("select * from tb_sku_class where class_id = #{classId}")
    SkuClassVo selectByClassId(Integer classId);

    void update(SkuClass skuClass);

    @Delete("delete from tb_sku_class where class_id = #{classId}")
    void delete(Integer classId);
}
